Skip to main content

Get PDF Page Count

AutomatR.DefaultActivities.PDF.GetPDFPageCount

The "Get PDF Page Count" activity in AutomatR is designed to retrieve the number of pages in a PDF document. This activity is valuable for scenarios where users need to determine the length of a PDF file as part of their automation workflows.

Properties

NameDescription
Input
File PathSpecifies the path of the PDF from which to retrieve the page count. String variables containing the file path.
PasswordSpecifies the password of the PDF file if applicable. Object variables containing the password.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Get PDF Page Count" activity. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1.
Output
ResultOutputs the page count of the PDF file. Integer variables to store the result.

How to use:

  1. Drag and drop the "Get PDF Page Count" activity onto the workflow.
  2. Configure the properties by specifying the input file path and, if applicable, the password for the PDF file.
  3. Optionally, configure the delay.
  4. Execute the workflow to obtain the page count of the specified PDF document.

Example: Consider an example where the "Get PDF Page Count" activity is used to retrieve the page count of a PDF file:

Get PDF Page Count:
File Path: "C:\Documents\Sample.pdf"
Password: "mypassword"
Result: pageCount

In this example, the activity retrieves the page count of the PDF file located at "C:\Documents\Sample.pdf" using the provided password, if applicable. The result, representing the number of pages, is stored in the integer variable "pageCount" for further handling in the workflow.